%% factorial.erl
%% Harry Wei <harryxiyou@gmail.com> (Erlang) 2012 1 31
-module(factorial).
-export([factorial/1]).

factorial(0) -> 1;
factorial(N) -> N * factorial(N - 1).
